Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-languageserver-types

Package Overview
Dependencies
Maintainers
8
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageserver-types

Types used by the Language server for node

  • 3.17.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created

What is vscode-languageserver-types?

The vscode-languageserver-types package provides data types used by the Visual Studio Code language server protocol. It helps in the development of language servers that can be integrated with editors supporting the protocol, enabling features like auto-completion, go-to-definition, or syntax highlighting.

What are vscode-languageserver-types's main functionalities?

Position and Range

Defines positions and ranges within a text document. Positions are zero-based and determine a point in a document by line and character offset. Ranges define a portion of text between two positions.

{ Position, Range } = require('vscode-languageserver-types');
let startPosition = Position.create(1, 5);
let endPosition = Position.create(1, 10);
let range = Range.create(startPosition, endPosition);

Text Edits

Allows for the creation of text edits, which are used to represent changes to a text document. These can be used to manipulate text by inserting, replacing, or deleting text in a document.

{ TextEdit } = require('vscode-languageserver-types');
let edit = TextEdit.replace(Range.create(Position.create(0, 0), Position.create(0, 10)), 'new text');

Diagnostics

Supports diagnostics, which are problems found in the code such as syntax errors or warnings. Diagnostics are associated with a range in the document and can have severities like Error, Warning, etc.

{ Diagnostic, Range, DiagnosticSeverity } = require('vscode-languageserver-types');
let diagnostic = Diagnostic.create(Range.create(Position.create(1, 0), Position.create(1, 1)), 'Syntax error', DiagnosticSeverity.Error, undefined, 'my-linter');

Other packages similar to vscode-languageserver-types

FAQs

Package last updated on 26 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc